﻿using System;

namespace Asistente.Managers
{
    public class ErrorManager
    {
        private static ErrorManager _instance = new ErrorManager();

        public static ErrorManager Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new ErrorManager();
                return _instance;
            }
        }

        public int GetSizeError(int realValue, int errorValue)
        {
            return realValue != 0 ? (Math.Abs((errorValue - realValue)/realValue)) : 0;
        }

        public DateTime GetTimeError(int hours, int minutes, int seconds, int functionalSize, int unitsPerHour)
        {
            throw new NotImplementedException();
            //double perfectMeasuringTimeHours = functionalSize / unitsPerHour;         
            //// Pasar a segundos

            //if (hours >= 0)
            //{
            //    seconds = hours * 60 *60;
            //}
            ////Agregamos minutos en caso de que los segundos sean mas que 60
            //if (minutes >= 0)
            //{
            //    seconds = minutes * 60;
            //}

            ////Comparo en segundos
        }
    }
}